import http from "./http";
import { ContentType } from "@/api/enum";
import {Response} from "./type"
import { AxiosResponse,AxiosRequestConfig } from "axios";
const customConfig:AxiosRequestConfig = {
  headers: {
    "Content-Type": ContentType.FORM,
  },
};
export const login = (data:Record<string,unknown>={}) =>
  http.post<Response,AxiosResponse<Response>>("/channelapi/pub/login", data, customConfig);
export const penal = (data:Record<string,unknown>={}) =>
  http.post<Response,AxiosResponse<Response>>("/channelapi/stats/panel", data, customConfig);
export const panellists = (data:Record<string,unknown>={}) =>
  http.post<Response,AxiosResponse<Response>>("/channelapi/stats/panellists", data, customConfig);
export const resetpwd = (data:Record<string,unknown>={}) =>
  http.post<Response,AxiosResponse<Response>>("/channelapi/user/resetpwd", data, customConfig);
export const info = (data:Record<string,unknown>={}) =>
  http.post<Response,AxiosResponse<Response>>("/channelapi/user/getinfo", data, customConfig);
export const decodes = (data:Record<string,unknown>={}) =>
  http.post<Response,AxiosResponse<Response>>("/channelapi/pub/decodes", data, customConfig);
